package com.imboss.sell.exception;

import com.imboss.sell.enums.ResultEnum;

/**
 * @ClassName SellException
 * @Description 所有的异常，配合ResultEnum使用
 * @Author 钟鲁超
 * @Date 2019/3/4 0004 下午 18:51
 **/
public class SellException extends RuntimeException {
    private Integer code;

    public SellException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public SellException(Integer code,String msg) {
        super(msg);
        this.code = code;
    }
}
